<div ng-include="'tpl/access/sign_header.html'"></div>
<div class="m-n bg-white padder-md padder-v">
    <div class="container back-more">
        <div class="center-block w-xxl bg-white m-t-lg padder-v padder-md">
            <a href class="padder-v block">
                <label class="no-padder h3 font-bold">找回密码&nbsp-&nbsp<p class="inline" ng-bind="{1:'手机号',2:'邮箱'}[type]"></p></label>
            </a>

            <div class="w-full m-b-sm header-container" ng-init="type=1">
                <div class="header-title" ng-class="{1:'header-title-active'}[type]" ng-click="type=1">
                    <p class="header-info">手机号方式</p>
                    <div class="tranbar triangle-down" ng-if="type==1"></div>
                </div>
                <div class="header-title" ng-class="{2:'header-title-active'}[type]" ng-click="type=2">
                    <p class="header-info">邮箱方式</p>
                    <div class="tranbar triangle-down" ng-if="type==2"></div>
                </div>
            </div>



            <!--电话号码忘记密码-->
            <div class="m-b" ng-if="type==1"  ng-controller="forgetPwdPhoneCtrl">
                <form name="phoneForm" class="bs-example form-horizontal" ng-submit="passwordPhoneForm()">
                    <div class="list-group list-group-sm m-b">
                        <div class="m-b-sm border-bottom border-bottom" ng-class="{'focus': 'border-bottom-active', 'blur': 'border-bottom-normal','error':'border-bottom-danger'}[phoneisActive]">
                            <label class="col-lg-3 m-t-xs text-left no-padder">手机号</label>
                            <div class="col-lg-5 no-padder">
                                <input type="text" class="form-control no-border table-condensed no-padder"
                                       placeholder="请输入您的手机号" ng-focus="phoneisActive='focus'"
                                       ng-model="pwdPhone.phone" ng-blur="phoneisActive='blur'"
                                       ng-pattern="/^1[34578]\d{9}$/" name="phone" required>
                                <div id="error" ng-if="phoneForm.phone.$touched">
                                    <label class="pull-left text-left text-danger h6 l-h"  ng-if="phoneForm.phone.$error.required">手机号为必填项</label>
                                    <label class="pull-left text-left text-danger h6 l-h"  ng-if="phoneForm.phone.$error.pattern">请填写正确的手机号</label>
                                </div>
                            </div>
                        </div>
                        <div class="m-b-sm border-bottom" ng-class="{'focus': 'border-bottom-active', 'blur': 'border-bottom-normal','error':'border-bottom-danger'}[authcodeisActive]">
                            <label class="col-lg-3 m-t-xs text-left no-padder">验证码</label>
                            <div class="col-lg-4 no-padder">
                                <input type="text" class="form-control no-border table-condensed no-padder"
                                       placeholder="请输入验证码" ng-focus="authcodeisActive='focus'" ng-blur="authcodeisActive='blur'"
                                       ng-model="pwdPhone.code" required>
                            </div>
                            <div class="col-lg-5 no-padder">
                                <label class="text-success userpointer btn btn-success pull-right" ng-bind="description" ng-disabled="canClick || phoneForm.phone.$error.required || phoneForm.phone.$error.pattern" ng-click="getCode()"></label>
                            </div>
                        </div>
                        <div class="m-b-sm border-bottom" ng-class="{'focus': 'border-bottom-active', 'blur': 'border-bottom-normal','error':'border-bottom-danger'}[authCodeisActive]">
                            <label class="col-lg-3 m-t-xs text-left no-padder">新密码</label>
                            <div class="col-lg-9 no-padder">
                                <input type="password" class="form-control no-border table-condensed no-padder"
                                       ng-model="pwdPhone.password" placeholder="请输入新密码" ng-focus="authCodeisActive='focus'"
                                       ng-minlength="6" ng-maxlength="255" ng-blur="authCodeisActive='blur'" name="password" required>
                                <div ng-if="phoneForm.password.$touched">
                                    <label class="pull-left text-left text-danger h6 l-h"  ng-if="phoneForm.password.$error.required">密码为必填项</label>
                                    <label class="pull-left text-left text-danger h6 l-h"  ng-if="phoneForm.password.$error.minlength || phoneForm.password.$error.maxlength">密码长度最少为6位数,最长为255位数</label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <button type="submit" class="btn btn-lg btn-success btn-block"  ng-disabled="phoneForm.$invalid">重置密码</button>
                    <a href="" class="block text-right m-t h6 text-muted" ui-sref="access.login">已注册?返回登录</a>
                </form>
            </div>

            <!--邮箱忘记密码-->
            <div class="m-b" ng-if="type==2"  ng-controller="forgetPwdEmailCtrl">
                <form name="emailForm" class="bs-example form-horizontal" ng-submit="passwordEmailForm()">
                    <div class="list-group list-group-sm m-b">
                        <div class="m-b-sm border-bottom border-bottom" ng-class="{'focus': 'border-bottom-active', 'blur': 'border-bottom-normal','error':'border-bottom-danger'}[phoneisActive]">
                            <label class="col-lg-3 m-t-xs text-left no-padder">邮箱号码</label>
                            <div class="col-lg-5 no-padder">
                                <input type="email" class="form-control no-border table-condensed no-padder"
                                       placeholder="请输入您的邮箱" ng-focus="phoneisActive='focus'"
                                       name="email" required="required" ng-model="pwdEmail.email" ng-blur="phoneisActive='blur'" required>
                                <div ng-if="emailForm.email.$touched">
                                    <label class="pull-left text-left text-danger h6 l-h"  ng-if="emailForm.email.$invalid">请填写正确的邮箱</label>
                                </div>
                            </div>
                        </div>
                        <div class="m-b-sm border-bottom" ng-class="{'focus': 'border-bottom-active', 'blur': 'border-bottom-normal','error':'border-bottom-danger'}[authcodeisActive]">
                            <label class="col-lg-3 m-t-xs text-left no-padder">验证码</label>
                            <div class="col-lg-4 no-padder">
                                <input type="text" class="form-control no-border table-condensed no-padder"
                                       placeholder="请输入验证码" ng-focus="authcodeisActive='focus'" ng-blur="authcodeisActive='blur'"
                                       ng-model="pwdEmail.code" required>
                            </div>
                            <div class="col-lg-5 no-padder">
                                <label class="text-success userpointer btn btn-success pull-right"  ng-bind="description"  ng-disabled="canClick || emailForm.email.$invalid" ng-click="getCodeEmail()"></label>
                            </div>
                        </div>
                        <div class="m-b-sm border-bottom" ng-class="{'focus': 'border-bottom-active', 'blur': 'border-bottom-normal','error':'border-bottom-danger'}[authCodeisActive]">
                            <label class="col-lg-3 m-t-xs text-left no-padder">新密码</label>
                            <div class="col-lg-9 no-padder">
                                <input type="password" class="form-control no-border table-condensed no-padder"
                                       ng-model="pwdEmail.password" placeholder="请输入新密码" ng-focus="authCodeisActive='focus'"
                                       ng-minlength="6" ng-maxlength="255" ng-blur="authCodeisActive='blur'" name="password" required>
                                <div ng-if="emailForm.password.$touched">
                                    <label class="pull-left text-left text-danger h6 l-h"  ng-if="emailForm.password.$error.required">密码为必填项</label>
                                    <label class="pull-left text-left text-danger h6 l-h"  ng-if="emailForm.password.$error.minlength || emailForm.password.$error.maxlength">密码长度最少为6位数,最长为255位数</label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <button type="submit" class="btn btn-lg btn-success btn-block" ng-disabled="emailForm.$invalid">重置密码</button>
                    <a href="" class="block text-right m-t h6 text-muted" ui-sref="access.login">已注册?返回登录</a>
                </form>
            </div>


        </div>
    </div>
</div>
<div ng-include="'tpl/access/sign_footer.html'"></div>






